package com.dq.service.record;

import com.dq.exception.customException.AdminException;
import com.dq.controller.in.StaffUserChangeQuery;

import com.dq.domain.org.Org;
import com.dq.domain.position.OrgPosition;
import com.dq.domain.record.StaffUserChangeRecord;
import com.dq.domain.record.WxUserChangeRecord;
import com.dq.domain.sys.user.user.StaffUser;
import com.dq.domain.sys.user.user.base.SysUser;
import com.dq.domain.sys.user.user.WxUser;

import java.util.List;

/**
 * @Author luchangtong
 * @Date 2019/12/10 14:03
 */
public interface StaffUserChangeRecordService {
    List<StaffUserChangeRecord> findByWhere(StaffUserChangeQuery staffUserChangeQuery);
    Long countByWhere(StaffUserChangeQuery staffUserChangeQuery);

    /**
     * 添加顾客变更记录
     */
    WxUserChangeRecord save(WxUser wxUser, StaffUser staffUser, Org nowOrg, WxUserChangeRecord.WxUserChangeType wxUserChangeType) throws AdminException;

    /**
     * 员工离职
     */
    void staffQuit(StaffUser staffUser) throws AdminException;

    /**
     * 员工调岗
     */
    void adjusting(OrgPosition orgPosition, Org org, SysUser sysUser, StaffUserChangeRecord.StaffUserChangeType type) throws AdminException;
}
